import 'package:flutter/material.dart';
import 'package:flutter_project/common/utils/image_picker_utils.dart';
import 'package:flutter_project/config/app_bar_view.dart';
import 'package:flutter_project/config/theme_color.dart';

class MySeriesVideoPage extends StatefulWidget {
  const MySeriesVideoPage({super.key});

  @override
  State<MySeriesVideoPage> createState() => _MySeriesVideoPageState();
}

class _MySeriesVideoPageState extends State<MySeriesVideoPage> {
  @override
  Widget build(BuildContext context) {
    return CommonAppWidget.navAppBar(
        title: '合集',
        bgColor: Colors.white,
        childWidget: Column(
          crossAxisAlignment: CrossAxisAlignment.start,
          children: [
            const SizedBox(
              height: 13,
            ),
            Row(
              children: [
                const SizedBox(
                  width: 20,
                ),
                Container(
                  width: 80,
                  height: 100,
                  decoration: BoxDecoration(
                      color: Colors.red,
                      borderRadius: BorderRadius.circular(4)),
                ),
                const SizedBox(
                  width: 20,
                ),
                Column(
                  mainAxisAlignment: MainAxisAlignment.spaceEvenly,
                  crossAxisAlignment: CrossAxisAlignment.start,
                  children: [
                    const Text(
                      '海阔天空',
                      style:
                          TextStyle(fontSize: 18, fontWeight: FontWeight.w500),
                    ),
                    const SizedBox(
                      height: 10,
                    ),
                    Text(
                      '霸道总裁爱上灰姑娘',
                      style: TextStyle(
                          fontSize: 14, color: ThemeColor.checkNormalColor),
                    ),
                    const SizedBox(
                      height: 10,
                    ),
                    Text(
                      '剧情',
                      style: TextStyle(
                          fontSize: 13, color: ThemeColor.checkNormalColor),
                    ),
                  ],
                ),
              ],
            ),
            const SizedBox(
              height: 13,
            ),
            Container(
              height: 10,
              color: ThemeColor.mainBgColor,
            ),
            Padding(
              padding: const EdgeInsets.only(left: 10, top: 12, right: 10),
              child: Row(
                mainAxisAlignment: MainAxisAlignment.spaceBetween,
                children: [
                  const Text(
                    '视频列表',
                    style: TextStyle(fontSize: 16, fontWeight: FontWeight.w500),
                  ),
                  TextButton(
                    onPressed: () {
                      ImagePickerUtils.getVideoFromAlbum();
                    },
                    child: const Text(
                      '上传',
                      style:
                          TextStyle(fontSize: 16, fontWeight: FontWeight.w500),
                    ),
                  ),
                ],
              ),
            ),
            Expanded(
                child: GridView.builder(
                    padding: const EdgeInsets.all(10),
                    gridDelegate:
                        const SliverGridDelegateWithFixedCrossAxisCount(
                            mainAxisSpacing: 10,
                            crossAxisSpacing: 10,
                            crossAxisCount: 3,
                            childAspectRatio: 3 / 4),
                    itemCount: 10,
                    itemBuilder: (BuildContext context, int index) {
                      return Container(
                        width: 80,
                        height: 100,
                        color: Colors.red,
                      );
                    }))
          ],
        ));
  }
}
